import request from "@/request/request";
// 获取栏目树-带顶级节点
export function getColumnTree(params) {
  return request({
    url: "/dev-api/policy/category/list/notExcludeno",
    method: "get",
    params,
  });
}
// 获取栏目树-不带顶级节点
export function getColumnTree2(params) {
  return request({
    url: "/dev-api/policy/category/list/exclude",
    method: "get",
    params,
  });
}
// 栏目新增
export function getColumnAdd(data) {
  return request({
    url: "/dev-api/policy/category",
    method: "post",
    data,
  });
}
// 栏目修改
export function getColumnEdit(data) {
  return request({
    url: "/dev-api/policy/category",
    method: "put",
    data,
  });
}
// 栏目删除
export function getColumnDelete(id) {
  return request({
    url: "/dev-api/policy/category/batch/" + id,
    method: "DELETE",
  });
}
// 查询政策栏目详细
export function getColumnDetail(id) {
  return request({
    url: "/dev-api/policy/category/" + id,
    method: "get",
  });
}
// 政策后台查询
export function getColumnList(params) {
  return request({
    url: "/dev-api/policy/notice/pageNtBs",
    method: "get",
    params,
  });
}
// 新增-修改
export function getNewOptions(data) {
  return request({
    url: "/dev-api/policy/notice/addNt",
    method: "post",
    data,
  });
}
// 资讯详情
export function getNewDetail(id) {
  return request({
    url: "/dev-api/policy/notice/details/" + id,
    method: "get",
    headers: {
        enterprise_id: "1581868639098753026",
        source_name: "25dea081aeb34f8e88f467a3306c33fa",
      },
  });
}
// 资讯删除
export function getNewDelete(id) {
  return request({
    url: "/dev-api/policy/notice/batch/" + id,
    method: "DELETE",
  });
}
// 资讯审核
export function getNewExamine(params) {
  return request({
    url: "/dev-api/policy/notice/examineList",
    method: "get",
    params,
  });
}

// 前台查询资讯列表
export function getNewsList(params) {
  return request({
    url: "/dev-api/policy/notice/pageNtRp",
    method: "get",
    params,
    headers: {
        enterprise_id: "1581868639098753026",
        source_name: "25dea081aeb34f8e88f467a3306c33fa",
    },
  });
}
// 前台查询资讯详情
export function getNewsDetail(id) {
  return request({
    url: "/dev-api/policy/notice/details/" + id,
    method: "get",
    headers: {
        enterprise_id: "1581868639098753026",
        source_name: "25dea081aeb34f8e88f467a3306c33fa",
      },
  });
}
// 根据父级Id查询出下一级子级
export function getChildsColumn(params) {
  return request({
    url: "/dev-api/policy/category/findByPr",
    method: "get",
    params,
    headers: {
      enterprise_id: "1581868639098753026",
      source_name: "25dea081aeb34f8e88f467a3306c33fa",
    },
  });
}

// 获取首页栏目树并排除顶级节点
export function newColumnList(params) {
  return request({
    url: "/dev-api/auth/indexMenu",
    method: "get",
    params,
    headers: {
      enterprise_id: "1581868639098753026",
      source_name: "25dea081aeb34f8e88f467a3306c33fa",
    },
  });
}
// 批量转移资讯
export function transferNews(data) {
  return request({
    url: "/dev-api/policy/notice/move",
    method: "put",
    data,
  });
}